<%@page import="sosr.serveur.IServeurRMI"%>
<%@page import="java.sql.Date"%>
<%@page import="sosr.bean.Patient"%>
<%@page import="base.Base"%>
<jsp:useBean id="pageConfig" scope="request" class="bean.Page"></jsp:useBean>
<jsp:useBean id="pageCGI" scope="session" class="bean.Page"></jsp:useBean>
<jsp:useBean id="logon" scope="session" class="bean.Connexion"></jsp:useBean>
<%

int id = pageConfig.getAction_id();

IServeurRMI serv = logon.getSrvRMI();
serv.open();

Patient p = serv.selectPatient(id);

boolean res = serv.dropPatient(id);

serv.close();
String msg = "";
if (res){
	String pat = "La patiente ";
	String SUPP = "e";
	if (p.getCivilite().equals("M")) { pat = "Le patient "; SUPP = ""; }
	msg = pat+p.getCivilite()+" "+p.getNom()+" "+p.getPrenom()+" est supprim&eacute;"+SUPP;

	pageCGI.setMessage("Notification",msg);
}
else {
	msg = "Probl&egrave;me lors de la suppression du patient "+p.getCivilite()+" "+p.getNom()+" "+p.getPrenom();

	pageCGI.setMessage("Erreur",msg);
}



%>
